﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace Cm.Web.Models.Demo
{
  
    public class Entity
    {
        [Display(Name = "ID")]
        public int ID { get; set; }
        [Display(Name = "名称")]
        [Required(AllowEmptyStrings = false, ErrorMessage = "名称不能为空!")]
        public string Name { get; set; }
        [Display(Name = "地址")]
        [Required(AllowEmptyStrings = false, ErrorMessage = "地址不能为空!")]
        public string Address { get; set; }
        [Display(Name = "年龄")]
        [Required(ErrorMessage = "年龄是必须的!")]
        [Range(18, 200, ErrorMessage = "年龄必须大于18且小于200!")]
        public int Age { get; set; }
         [Display(Name = "价格")]
        
        public decimal Price { get; set; }
    }
}
